package com.md24housecall.manager;

import com.md24housecall.util.GlobalConstant;
import com.md24housecall.util.Utils;

import android.media.MediaRecorder;

public abstract class RecordManager {
	protected MediaRecorder mRecorder = null;
	protected GlobalConstant constant = GlobalConstant.getInstance();
	protected Utils util=Utils.getInstance();
	protected final String mFileName = constant.file.getAbsolutePath();
	
	public void onRecord(boolean start) {
		if (start) {
			startRecording();
		} else {
			stopRecording();
		}
	}

	public abstract String createFileName();
	public abstract void startRecording();

	public void stopRecording() {
		mRecorder.stop();
		mRecorder.release();
		mRecorder = null;
	}
}
